import 'package:flutter/material.dart';
import 'package:flutter_html/flutter_html.dart';
import 'package:get/get.dart';

class HtmlView extends StatelessWidget {
  const HtmlView({super.key});

  @override
  Widget build(BuildContext context) {
    final data = Get.parameters;
    return Scaffold(
      backgroundColor: Colors.white,
      appBar: AppBar(
        surfaceTintColor: Colors.white,
        backgroundColor: Colors.white,
        leading: IconButton(
            onPressed: Get.back,
            icon: const Icon(
              Icons.arrow_back_ios,
              color: Colors.black,
            )),
        title: const Text("个人信息保护声明"),
      ),
      body: SingleChildScrollView(child: Padding(
        padding: const EdgeInsets.symmetric(horizontal: 12),
        child: Html(data: data["html"] ?? ""),
      )),
    );
  }
}
